'use strict';

function amount_even(collection) {

  let even=collection.filter((x)=>{
    return x%2==0
  })
  let sum=even.reduce(
    (a,b)=>a+b
  )
  return sum;
}

module.exports = amount_even;
